import {MockMethod} from 'vite-plugin-mock'
import {baseApi} from "../config";

export default [
    {
        url: `${baseApi}/system/config/add`,
        params: {
            "configId": 0,
            "configName": "等级",
            "configKey": "level",
            "configValue": "0,1,2",
            "configType": "0",
            "remark": ""
        },
        method: 'POST',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {
        url: `${baseApi}/system/config/delete`,
        params: {"ids": [1]},
        method: 'delete',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {
        url: `${baseApi}/system/config/edit`,
        params: {
            "configId": 2,
            "configName": "文件上传-文件类型",
            "configKey": "sys.uploadFile.fileType",
            "configValue": "doc,docx,zip,xls,xlsx,rar,jpg,jpeg,gif,npm,png,mp4",
            "configType": "1",
            "createdBy": 31,
            "updatedBy": 31,
            "remark": "文件上传后缀类型限制",
            "createdAt": "2024-08-28 22:25:52",
            "updatedAt": "2024-08-28 22:25:52"
        },
        method: 'put',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {
        url: `${baseApi}/system/config/get`,
        params: {id: 2},
        method: 'get',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": {
                    "data": {
                        "configId": 2,
                        "configName": "文件上传-文件类型",
                        "configKey": "sys.uploadFile.fileType",
                        "configValue": "doc,docx,zip,xls,xlsx,rar,jpg,jpeg,gif,npm,png,mp4",
                        "configType": 1,
                        "createdBy": 31,
                        "updatedBy": 31,
                        "remark": "文件上传后缀类型限制",
                        "createdAt": "2024-08-28 22:25:52",
                        "updatedAt": "2024-08-28 22:25:52"
                    }
                }
            }
        }
    },
    {
        url: `${baseApi}/system/config/list`,
        //params:{pageNum:1,pageSize:10,configName:'',configKey:'',configType:''},
        method: 'get',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": {
                    "list": [
                        {
                            "configId": 1,
                            "configName": "文件上传-文件大小",
                            "configKey": "sys.uploadFile.fileSize",
                            "configValue": "50M",
                            "configType": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "remark": "文件上传大小限制",
                            "createdAt": "2024-08-28 22:25:52",
                            "updatedAt": "2024-08-29 00:05:24"
                        },
                        {
                            "configId": 2,
                            "configName": "文件上传-文件类型",
                            "configKey": "sys.uploadFile.fileType",
                            "configValue": "doc,docx,zip,xls,xlsx,rar,jpg,jpeg,gif,npm,png,mp4",
                            "configType": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "remark": "文件上传后缀类型限制",
                            "createdAt": "2024-08-28 22:25:52",
                            "updatedAt": "2024-08-28 22:25:52"
                        },
                        {
                            "configId": 3,
                            "configName": "图片上传-图片类型",
                            "configKey": "sys.uploadFile.imageType",
                            "configValue": "jpg,jpeg,gif,npm,png",
                            "configType": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "remark": "图片上传后缀类型限制",
                            "createdAt": "2024-08-28 22:25:52",
                            "updatedAt": "2024-08-28 22:25:52"
                        },
                        {
                            "configId": 4,
                            "configName": "图片上传-图片大小",
                            "configKey": "sys.uploadFile.imageSize",
                            "configValue": "50M",
                            "configType": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "remark": "图片上传大小限制",
                            "createdAt": "2024-08-28 22:25:52",
                            "updatedAt": "2024-08-28 22:25:52"
                        },
                        {
                            "configId": 5,
                            "configName": "静态资源",
                            "configKey": "static.resource",
                            "configValue": "/",
                            "configType": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "remark": "静态资源路径",
                            "createdAt": "2024-08-28 22:25:52",
                            "updatedAt": "2024-08-28 22:25:52"
                        }
                    ],
                    "currentPage": 1,
                    "total": 5
                }
            }
        }
    },
] as MockMethod[]
